import Taro, { Component } from '@tarojs/taro'
import { View, Swiper, SwiperItem,Image } from '@tarojs/components'
import './index.scss'
import bg1 from '../../static/images/bg1.jpg'
import bg2 from '../../static/images/bg2.jpg'
import bg3 from '../../static/images/bg3.jpg'

export default class Index extends Component {

  config = {
    navigationBarTitleText: '首页'
  }

  componentWillMount () { }

  componentDidMount () { }

  componentWillUnmount () { }

  componentDidShow () { }

  componentDidHide () { }

  render () {
    return (
      <View className='index'>
        <Swiper
          className='test-h'
          indicatorColor='#999'
          indicatorActiveColor='#333'
          vertical={false}
          circular
          indicatorDots
          autoplay
        >
          {[bg1, bg2, bg3].map((d, i) => {
            return <SwiperItem key={i}>
                <Image src={d} style={{height:150,width:'100%'}} />
            </SwiperItem>
          })}
        </Swiper>
      </View>
    )
  }
}

